﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace 股票API智能交易
{
    public partial class 登录界面 : Form
    {
        public 登录界面()
        {
            InitializeComponent();
        }
        //让关闭按钮失效
        private const int CP_NOCLOSE_BUTTON = 0x200;
        protected override CreateParams CreateParams
        {
            get
            {
                CreateParams myCp = base.CreateParams;
                myCp.ClassStyle = myCp.ClassStyle | CP_NOCLOSE_BUTTON;
                return myCp;
            }
        }

        private void 登录_Click(object sender, EventArgs e)
        {
            if (this.输入用户名.Text != "admin")
            {
                MessageBox.Show("用户名错误");
                return;
            }
            if (this.输入密码.Text != "888888")
            {
                MessageBox.Show("密码错误");
                return;
            }
            //this.Close();
            this.DialogResult = DialogResult.OK;
        }

        private void 关闭_Click(object sender, EventArgs e)
        {
            Application.Exit();
        }

        
    }
}